package com.zhangfb95.crosschain.plugin.client.java.fabric2.infra.config.properties;

import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author zhangfubing
 * @since 2023/12/3
 */
@Data
@Accessors(chain = true)
@Component
@ConfigurationProperties("biz.service.plugin.java-fabric2")
public class JavaFabric2PluginProperties {

    private List<ContainerInfo> containerInfos;

    @Data
    @Accessors(chain = true)
    public static class ContainerInfo {

        /**
         * 是否启用
         */
        private boolean enable;
        /**
         * 链容器url
         */
        private String url;
        /**
         * ssl类型, none: 不开启, rsa: rsa, gm: 国密
         */
        private String sslType;
        /**
         * ssl根ca
         */
        private String caCert;
        /**
         * ssl key
         */
        private String sslKey;
        /**
         * ssl cert
         */
        private String sslCert;
    }
}
